import Koa from 'koa'
class AppInstance {
  app!: Koa
  static appInstance: AppInstance = new AppInstance()

  init(app: Koa) {
    this.app = app
  }

  getApp() {
    return this.app
  }

  getRootRouter() {
    return this.app.context.rootRouter
  }
}

export const { appInstance } = AppInstance
